#ifndef SCHEDULER_H_
#define SCHEDULER_H_

#include"../process/process.h"
#include"../queue/bqueue.h"
#include "../arraylist/barray_list.h"

typedef enum SchedulerType{
  PRIORITY, ROUND_ROBIN, LOTTERY
}SchedulerType;

typedef struct Scheduler{
  SchedulerType type;
  bqueue* ready_queue;
  bqueue** ready_priority_queue;
  barray_list* ready_arr_queue;
  Process* (*next_proc)(struct Scheduler*);
  void (*ready_process)(struct Scheduler*, Process*);
  pthread_mutex_t* lock;
}Scheduler;

int schedulerInit(Scheduler*, SchedulerType);
Process* nextRRProcess(Scheduler*);
Process* nextPRProcess(Scheduler*);
Process* nextLOProcess(Scheduler*);

void readyRRProc(Scheduler*,Process*);
void readyPRProc(Scheduler*,Process*);
void readyLOProc(Scheduler*,Process*);
#endif
